﻿namespace com.uplus.data
{
    public interface IDaAccess
    {
        int CountSql(string sql);
        int CountSql(string sql, System.Collections.Generic.Dictionary<string, object> paramValues);
        int CountSql(string sql, string paramName, object paramValue);
        int Delete(string table, System.Collections.Generic.Dictionary<string, object> colValues);
        int Delete(string table, string pkColumn, params object[] values);
        int Excute(string sql, System.Collections.Generic.Dictionary<string, object> paramValues);
        int Excute(string sql);
        int Excute(string sql, string paramName, object paramValue);
        bool Exists(string tb, System.Collections.Generic.Dictionary<string, object> paramValues);
        bool Exists(string tb, string colName, object value);
        bool Exists(string tb);
        bool ExistsSql(string sql, System.Collections.Generic.Dictionary<string, object> paramValues);
        bool ExistsSql(string sql, string paramName, object paramValue);
        bool ExistsSql(string sql);
        DmRecord Get(string table, System.Collections.Generic.Dictionary<string, object> colValues);
        DmRecord Get(string table, string pkColumn, object value);
        System.Data.DataTable GetList(string sql);
        System.Data.DataTable GetList(string sql, string paramName, object paramValue);
        System.Data.DataTable GetList(string sql, System.Collections.Generic.Dictionary<string, object> paramValues);
        T GetValue<T>(string sql, System.Collections.Generic.Dictionary<string, object> paramValues);
        T GetValue<T>(string sql);
        T GetValue<T>(string sql, string paramName, object paramValue);
        int Insert(string tableName, System.Collections.Generic.Dictionary<string, object> colvalues);
        int Update(string table, string colName, object colNameValue, string colWhere, object colWhereValue);
        int Update(string table, System.Collections.Generic.Dictionary<string, object> colValues, System.Collections.Generic.Dictionary<string, object> where);
        int Update(string table, System.Collections.Generic.Dictionary<string, object> colvalues, string pkcol, object pkValue);
    }
}
